﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
namespace weiqijiance.工位配置
{
    public partial class 仪表配置 : CCSkinMain
    {
        public 仪表配置()
        {
            InitializeComponent();
        }
        public void szct(Form f,TabPage p)
        {
            try
            {
                ((CCSkinMain)f).Shadow = false;
            }
            catch { }

            f.Dock = DockStyle.Fill;
            f.FormBorderStyle = FormBorderStyle.None;//去掉边框
            f.TopLevel = false;
            f.Parent = p;
            p.Tag = f;
            f.Show();
        }
        public bool bAPs = false;
        public bool bAP = false;
        public bool bBR = false;
        public bool bFL = false;
        public bool bWE = false;
        public bool bLI = false;
        public bool bSL = false;
        public bool bSP = false;
        public bool bSU = false;
        public bool bDLX = false;
        public bool bYH = false;
        public bool bzbzl = false;
        private void 仪表配置_Load(object sender, EventArgs e)
        {

            APsetting f1 = new APsetting();
            BRsetting f2 = new BRsetting();
            FLsetting f3 = new FLsetting();
            WEsetting f4 = new WEsetting();
            LIsetting f5 = new LIsetting();
            SLsetting f6 = new SLsetting();
            SPsetting f7 = new SPsetting();
            SUsetting f8 = new SUsetting();
            DLXsetting f9 = new DLXsetting();
            YHsetting f10 = new YHsetting();
            ZBZLsetting f11 = new ZBZLsetting();
            APSsetting f12 = new APSsetting();
            if (bAP) szct(f1, tabPage1);
            if (bBR) szct(f2, tabPage2);
            if (bFL) szct(f3, tabPage3);
            if (bWE) szct(f4, tabPage4);
            if (bLI) szct(f5, tabPage5);
            if (bSL) szct(f6, tabPage6);
            if (bSP) szct(f7, tabPage7);
            if (bSU) szct(f8, tabPage8);
            if (bDLX) szct(f9, tabPage9);
            if (bYH) szct(f10, tabPage10);
            if (bzbzl) szct(f11, tabPage11);
            if (bAPs) szct(f12, tabPage12);
            if (!bAP) tabPage1.Parent = null;
            if (!bBR) tabPage2.Parent = null;
            if (!bFL) tabPage3.Parent = null;
            if (!bWE) tabPage4.Parent = null;
            if (!bLI) tabPage5.Parent = null;
            if (!bSL) tabPage6.Parent = null;
            if (!bSP) tabPage7.Parent = null;
            if (!bSU) tabPage8.Parent = null;
            if (!bDLX) tabPage9.Parent = null;
            if (!bYH) tabPage10.Parent = null;
            if (!bzbzl) tabPage11.Parent = null;
            if (!bAPs) tabPage12.Parent = null;
        }
    }
}
